package com.yc.star.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 聊天记录表
 * </p>
 *
 * @author ljl
 * @since 2024-07-23
 */
@TableName("s_talkmsg")
@Data
public class Talkmsg implements Serializable {

    private static final long serialVersionUID = 1L;

      /**
     * id
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      /**
     * 发送者ID
     */
      private Long sendid;

      /**
     * 接收者ID
     */
      private Long receiveid;

      /**
     * 消息内容
     */
      private String message;

      /**
     * 发送时间
     */
      private LocalDateTime createTime;

      /**
     * 是否删除
     */
      private Byte isdelete;

    /**
     * 发送者名字
     */
    @TableField(exist = false)
    private String sendername;

    /**
     * 接受者名字
     */
    @TableField(exist = false)
    private String receivename;

    /**
     * 发送者名字图像
     */
    @TableField(exist = false)
    private String senderimg;

    /**
     * 接受者名字图像
     */
    @TableField(exist = false)
    private String receiveimg;
    
    public Long getId() {
        return id;
    }

      public void setId(Long id) {
          this.id = id;
      }
    
    public Long getSendid() {
        return sendid;
    }

      public void setSendid(Long sendid) {
          this.sendid = sendid;
      }
    
    public Long getReceiveid() {
        return receiveid;
    }

      public void setReceiveid(Long receiveid) {
          this.receiveid = receiveid;
      }
    
    public String getMessage() {
        return message;
    }

      public void setMessage(String message) {
          this.message = message;
      }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }

      public void setCreateTime(LocalDateTime createTime) {
          this.createTime = createTime;
      }
    
    public Byte getIsdelete() {
        return isdelete;
    }

      public void setIsdelete(Byte isdelete) {
          this.isdelete = isdelete;
      }

    @Override
    public String toString() {
        return "Talkmsg{" +
                "id=" + id +
                ", sendid=" + sendid +
                ", receiveid=" + receiveid +
                ", message='" + message + '\'' +
                ", createTime=" + createTime +
                ", isdelete=" + isdelete +
                ", sendername='" + sendername + '\'' +
                ", receivename='" + receivename + '\'' +
                ", senderimg='" + senderimg + '\'' +
                ", receiveimg='" + receiveimg + '\'' +
                '}';
    }
}
